package com.gitee.cashzhang27.test.boot.functional.constraint;

import com.gitee.cashzhang27.test.boot.functional.validator.MustBeExistValidator;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * @author Cash Zhang
 * @version v1.0 2020/09/16 18:04
 * @since v1.0
 */
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = MustBeExistValidator.class)
public @interface IdMustBeExist {

  String message() default "{com.gitee.cashzhang27.test.boot.functional.constraint.IdMustBeExist.message}";

  Class<?>[] groups() default {};

  Class<? extends Payload>[] payload() default {};

}
